/*
 * EventLogger.cpp
 *  Created on: Dec 10, 2011
 *      Author: Michael Anderson
 *      Part of Team 955 Battery Cart project
 *      compiled on Eclipse with Arduino libraries and avr-gcc
 */

#include "EventManager.h"

//TODO: Add logging code

EventManager::EventManager() {
    listener = 0;
    //sd = new SDClass();
    //sd->begin(4); //TODO: Is this right?
}

void EventManager::setEventListener(EventCallback *list) {
    listener = list;
}

void EventManager::chargerEvent(uint8_t chargerID, charger_event event) {
    if (listener)
        listener->_chargerEventCallback(chargerID, event);
}

void EventManager::conditionerEvent(uint8_t condID, uint8_t battID, conditioner_event event, conditioner_state oldState, conditioner_state newState, uint32_t timeSecs) {
    if (listener)
        listener->_conditionerEventCallback(condID, battID, event);
}

inline void EventManager::println(char* str) {

}
